from collections import namedtuple
from utils.namespace import Namespace

from .signals import SIGNALS


TerminationStatus = namedtuple("TerminationStatus", ["message", "signal"])
TERMINATION = Namespace(
    UNKNOWN=TerminationStatus("unknown termination status", SIGNALS.UNKNOWN_TERMINATION),
    OPTIMAL=TerminationStatus("optimal solution found", SIGNALS.OPTIMAL_SOLUTION),
    INFEASIBLE=TerminationStatus("unable to find feasible solutions", SIGNALS.PROBLEM_INFEASIBLE))
